import {userroles ,updateRoles} from '@/api/user'
export default {
    namespaced: true,
    state: {
        list: [],
    },
    mutations: {
    
        setrole(state,res){
            state.list=res.data
        }
    },

    actions: {
       
       async  getlist({commit}){
        const res= await userroles();
        
        commit('setrole',res.data)
       },
       async setUserRole({commit},role){
        const res= await updateRoles(role);
        
       }
    },
    getters: {}
}